package com.hnluchuan.staff.model;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;
import com.hnluchuan.core.model.BaseModel;

import javax.persistence.ManyToOne;
import javax.persistence.JoinColumn;
import javax.persistence.FetchType;
import com.hnluchuan.staff.model.Employee;

/**
 * 紧急联系人
 */
@Entity
@Table(name = "emergency_contact") 
public class EmergencyContact extends BaseModel {
	private static final long serialVersionUID = 1L;
	
	public EmergencyContact() {
	}
	
	public EmergencyContact(Long id) {
		this.emid = id;
	}
	
	/**
	 * id
	 */
	@Id
	@GeneratedValue
	@Column(name = "id")
	private Long emid;
	/**
	 * 员工ID
	 */
	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "employee_id")
	private Employee employee;
	/**
	 * 姓名
	 */
	@Column(name = "name")    		
	private String emname;
	/**
	 * 关系
	 */
	@Column(name = "relation")    		
	private String relation;
	/**
	 * 联系电话
	 */
	@Column(name = "phone")    		
	private String emphone;
	/**
	 * 单位或住址
	 */
	@Column(name = "address")    		
	private String emaddress;

	private Boolean deleted;
	// fields end
	

	/** 员工ID */
	public Employee getEmployee() {
    	return employee;
    }
    /** 员工ID */
    public void setEmployee(Employee employee) {
    	this.employee = employee;
    }

	/** 关系 */
	public String getRelation() {
    	return relation;
    }
    /** 关系 */
    public void setRelation(String relation) {
    	this.relation = relation;
    }



	public String getEmname() {
		return emname;
	}

	public void setEmname(String emname) {
		this.emname = emname;
	}

	public String getEmphone() {
		return emphone;
	}

	public void setEmphone(String emphone) {
		this.emphone = emphone;
	}

	public String getEmaddress() {
		return emaddress;
	}

	public void setEmaddress(String emaddress) {
		this.emaddress = emaddress;
	}

	public Long getEmid() {
		return emid;
	}

	public void setEmid(Long emid) {
		this.emid = emid;
	}

	public Boolean getDeleted() {
		return deleted;
	}

	public void setDeleted(Boolean deleted) {
		this.deleted = deleted;
	}
}
